/** 
* @param {array}
* @param {function}
* @returns {boolean}
**/
function map(array, callback) {
  if (!Array.isArray(array)) return
  const len = array.length
  const res = new Array(len)
  let i = -1

  while(++i < len) {
    res[i] = callback(array[i], i, array)
  }
  return res
}

export default map